#version 330 core

struct Material {
    sampler2D diffuse;
};

in vec2 TexCoords;

uniform Material material;
uniform bool isSelected;

out vec4 FragColor;

void main()
{
    vec4 texColor = texture(material.diffuse, TexCoords);
    if(texColor.a < 0.1)
        discard;
    if(isSelected)
        FragColor = texColor * 0.8;
    else
        FragColor = texColor;
}
